﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OF.Component.Model
{
    /// <summary>
    /// easyui tree model
    /// </summary>
    public class TreeModel
    {
        /// <summary>
        /// node id, which is important to load remote data
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// node text to show
        /// </summary>
        public string text { get; set; }
        /// <summary>
        /// The css class to display icon
        /// </summary>
        public string iconCls { get; set; }
        /// <summary>
        /// node state, 'open' or 'closed', default is 'open'. When set to 'closed', the node have children nodes and will load them from remote site
        /// </summary>
        public string state { get; set; }
        /// <summary>
        /// Indicate whether the node is checked selected.
        /// </summary>
        public bool @checked
        {
            get;
            set;
        }
        /// <summary>
        /// custom attributes can be added to a node
        /// </summary>
        public Dictionary<string,string> attributes { get; set; }
        /// <summary>
        /// an array nodes defines some children nodes
        /// </summary>
        public List<TreeModel> children { get; set; }
    }
}
